* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

header h1 {
    color: white;
    font-size: 28px;
    font-weight: 600;
}

header h1 i {
    margin-right: 10px;
    color: #ffd700;
}

.language-switch {
    display: flex;
    gap: 10px;
}

.language-switch button {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-switch button.active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.language-switch button:hover {
    background: rgba(255, 255, 255, 0.4);
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

.config-panel,
.preview-panel,
.output-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(10px);
}

h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

h3 {
    color: #764ba2;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 500;
}

.keybinding-section {
    margin-bottom: 30px;
}

.key-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.key-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.key-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.key-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.key-input {
    background: white;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.key-input:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

kbd {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.options-section {
    margin-top: 30px;
}

.option-item {
    margin-bottom: 15px;
}

.option-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.option-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.window-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    width: 100%;
    height: 300px;
    background: #2d3748;
    padding: 10px;
    border-radius: 10px;
}

.window-pane {
    background: #1a202c;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.window-pane.active {
    border: 2px solid #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.pane-header {
    background: #2d3748;
    color: white;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
}

.pane-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
    font-size: 14px;
}

.pane-content i {
    font-size: 24px;
    margin-bottom: 8px;
    color: #667eea;
}

#pane-1 {
    grid-column: 1;
    grid-row: 1;
}

#pane-2 {
    grid-column: 2;
    grid-row: 1;
}

#pane-3 {
    grid-column: 1 / -1;
    grid-row: 2;
}

.preview-controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
}

.preview-btn {
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}

.preview-btn:hover {
    background: #764ba2;
    transform: scale(1.05);
}

.preview-btn:active {
    transform: scale(0.95);
}

.code-container {
    position: relative;
    background: #1a202c;
    border-radius: 10px;
    padding: 20px;
    overflow-x: auto;
}

pre {
    margin: 0;
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.copy-button,
.share-button {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.share-button {
    position: static;
    margin-top: 15px;
    width: 100%;
}

.copy-button:hover,
.share-button:hover {
    background: #764ba2;
}

.share-section {
    margin-top: 20px;
}

.share-link {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.share-link input {
    flex: 1;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
}

.share-link button {
    padding: 10px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

@media (max-width: 1200px) {
    main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
    }
    
    .key-grid {
        grid-template-columns: 1fr;
    }
    
    .window-layout {
        height: 200px;
    }
}
